<template>
  <div>
    <data-table
      :value="tableData"
      :table-column-attributes="tableColumnAttributes"
      :width="160"
    >
    </data-table>
  </div>
</template>

<script>
import baseMixin from '@/mixins/base'
import { receiptDueHistory } from '@/api/financial/index'
export default {
  components: {},
  props: {
    dialogData: {
      type: Object,
      default: () => { },
    }
  },
  mixins: [baseMixin({})],
  data() {
    return {
      tableColumnAttributes: [
        { name: '收款时间', value: 'receiptDate', type: 'text' },
        { name: '收款描述', value: 'description', type: 'text' },
        { name: '收款单号', value: 'code', type: 'text' },
        { name: '客户名称', value: 'customerName', type: 'text' },
        { name: '收款对象', value: 'receiptObjects', type: 'text' },
        { name: '收款项目', value: 'item', type: 'text' },
        { name: '收款方式', value: 'receiptType', type: 'text' },
        { name: '银行', value: 'bank', type: 'text' },
        { name: '银行流水号', value: 'businessCode', type: 'text' },
        { name: '收款金额', value: 'receivedAmount', type: 'text' },
        { name: '收款人', value: 'receiptPerson', type: 'text' },
      ]
    }
  },
  methods: {},
  async mounted() {
    const { success, data } = await receiptDueHistory(this.dialogData.id);
    if (success) {
      this.tableData = data;
    }
  }
}
</script>

<style scoped>

</style>
